package com.kt.kvw.validation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Created with IntelliJ IDEA.
 * Desc:
 *
 * @author: keen
 * Date: 2020-07-06
 * Time: 21:13
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Constraint(validatedBy = ScopeValidation.class)
public @interface Scope {

    String[] values() default {};

    String message() default "传入的值不是可选值之一";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
